package com.hopster;

import android.app.PendingIntent;

public class Alarm
{
	private String name;
	private int hour;	// 0-23
	private int minute;	// 0-59
	private PendingIntent intent;	// This will be non-null if the alarm opens a puzzle. Otherwise it's null.
	
	/**
	 * Sets the given name, hour, and minute of the Alarm and sets the intent to null.
	 */
	public Alarm(String name, int hour, int minute)
	{
		this(name, hour, minute, null);
	}
	
	/**
	 * Sets the given name, hour, minute, and intent of the Alarm.
	 */
	public Alarm(String name, int hour, int minute, PendingIntent intent)
	{
		this.name = name;
		this.hour = hour;
		this.minute = minute;
		this.intent = intent;
	}
	
	public boolean equals(Object o)
	{
		Alarm other = (Alarm)o;
		return name.equals(other.getName());
	}
	
	public String getName()
	{
		return name;
	}
	
	public int getHour()
	{
		return hour;
	}
	
	public int getMinute()
	{
		return minute;
	}
	
	public PendingIntent getIntent()
	{
		return intent;
	}
}
